﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using octopus_project.enumeration;
using octopus_project.input;
using Microsoft.Xna.Framework.Input;
using octopus_project.scene;
using Microsoft.Xna.Framework;
using octopus_project.scene.cannon.weapon;
using octopus_project.typegame;

namespace octopus_project {
    class Player {
        private PlayerIndex playerIndex;
        private String name;
        private PlayersColor color;
        private Dictionary<ActionKey, Keys> playerKeysMap;
        private Dictionary<ActionKey, Buttons> playerButtonsMap;
        private Stats stats;

        public Player (String name) {
            this.name = name;
        }

        /// <summary>
        /// Description.
        /// </summary>
        public Keys getActionKey (ActionKey actionKey) {
            if (PlayerKeysMap.ContainsKey(actionKey)) {
                return PlayerKeysMap[actionKey];
            }
            else {
                return Keys.None;
            }
        }

        /// <summary>
        /// Description.
        /// </summary>
        public Buttons getActionButton (ActionKey actionKey) {
            if (PlayerButtonsMap.ContainsKey(actionKey)) {
                return PlayerButtonsMap[actionKey];
            }
            else {
                return 0;
            }
        }

        internal Dictionary<ActionKey, Keys> PlayerKeysMap {
            get { return playerKeysMap; }
            set { playerKeysMap = value; }
        }

        internal Dictionary<ActionKey, Buttons> PlayerButtonsMap {
            get { return playerButtonsMap; }
            set { playerButtonsMap = value; }
        }


        public PlayersColor Color {
            get { return color; }
            set { color = value; }
        }
        public String Name {
            get { return name; }
            set { name = value; }
        }


        public PlayerIndex PlayerIndex {
            get { return playerIndex; }
            set { playerIndex = value; }
        }

        public Stats Stats {
            get { return stats; }
            set { stats = value; }
        }
    }
}
